package com.example.yam.greenapp;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

/**
 * Created by 杨建利on 2017/1/24.
 */

public class MyListView extends ListView {

    public MyListView(Context context){
        super(context);
    }
    public MyListView(Context context, AttributeSet atts){
        super(context,atts);
    }
    public MyListView(Context context, AttributeSet atts,int defStyle){
        super(context,atts,defStyle);
    }
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
